﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Tebbee.Business.Server.Model;

namespace Tebbee.Business.Server
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IAdvertiseSer" in both code and config file together.
    [ServiceContract]
    public interface IAdvertiseSer
    {
        [OperationContract]
        ICollection<Advertise_GetByCatId_Result> Advertise_GetByCatId(string searchString, int currentPage, int catId, out int totalPage);
        [OperationContract]
        Advertise_Get_Result GetAdvertise(int id);
        [OperationContract]
        ICollection<Advertise_GetLink_Result> GetAdvertiseLink(int id, out string type);
        [OperationContract]
        int Advertise_DeleteComment(int commentId);
        [OperationContract]
        Advertise_ViewAdv_Result ViewAdv(string userName, int advId);
        [OperationContract]
        ICollection<Advertise_GetImage_Result> Advertise_GetImage(int id);
        [OperationContract]
        void Advertise_Like(string userName, int advId);
        [OperationContract]
        void Advertise_Rate(string userName, int advId, double star);
        [OperationContract]
        void Advertise_Subcribe(string userName, int advId);
        [OperationContract]
        ICollection<Advertise_GetComment_Result> Advertise_GetComment(int id);
        [OperationContract]
        ICollection<Advertise_GetMedia_Result> Advertise_GetMedia(int id);
        [OperationContract]
        Advertise_SendComment_Result Advertise_SendComment(int id, string userName, string content);

        [OperationContract]
        ICollection<Advertise_TOP_Result> GetAdvertiseTop(string type);
        [OperationContract]
        ICollection<Advertise_Search_Result> Advertise_Search(string searchString);
        [OperationContract]
        int AddNewAdvertise(AdvertiseUpload adv);


        [OperationContract]
        int AddNewCatMap(int advId, int catId);

        [OperationContract]
        int AddNewMedia(int advId, string mediaLink);

        [OperationContract]
        ICollection<Advertise_List_Result> ListAdvertising(int startRow, int elementQ, int orderBy, string searchString);

        [OperationContract]
        ICollection<CatMap_GetByAdv_Result> GetCategoriesByAdv(int advId);

        [OperationContract]
        ICollection<Media_GetByAdv_Result> GetMediaByAdv(int advId);

        [OperationContract]
        int DelAdv(int advId);

        [OperationContract]
        int EditAdv(Advertisement adv);

        [OperationContract]
        ICollection<Comment_GetByAdv_Result> GetCommentsByAdv(int advId);

        [OperationContract]
        int EditComment(Comment cm);

        [OperationContract]
        ICollection<String> GetDelImg(int advId);
    }
}
